package com.sali.controller.sysrole;

import com.sali.application.sysrole.model.vo.SysRolesMenuApisVO;
import com.sali.application.sysrole.service.ISysRolesService;
import com.sali.commons.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: sali
 * @date: 2024/8/24 下午12:25.
 * @version: 1.0
 */
@RestController
public class SysRolesController extends BaseController {

    @Autowired
    private ISysRolesService sysRolesService;

    /**
     * 角色切换
     *
     * @param roleId
     * @return
     */
    @PostMapping("/role/change")
    public SysRolesMenuApisVO changeRole(@RequestParam("roleId") Long roleId) {
        return sysRolesService.findRoleMenusPermission(roleId);
    }

}
